﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 接口
{
    //interface interface interface interface interface interface interface interface inrerface interface interface interface interface interface interface
   public interface  IFlyable
        //interface interface interface interface interface interface interface interface interface interface interface interface 
    {
        //接口成员不允许出现访问修饰符，默认就是public
        //方法、自动属性、索引器
         void Fly();
        //string Test();
        //不允许写有方法体的成员
        //string _name;接口中不能包含字段
        //string Name
        //{
        //    get;
        //    set;
        //}
    }
    public class Person:IFlyable
    {
        public void Fly()
        {
            Console.WriteLine("猴子在飞");
        }
        //显示接口
        void IFlyable.Fly()
        {
            Console.WriteLine("我是接口的飞");
        }
    }
    public class Bird : IFlyable
    {
        public void Fly()
        {
            Console.WriteLine("鸟在飞");
        }
        void IFlyable.Fly()
        {
            Console.WriteLine("我是接口的飞");
        }
    }
}
